package com.zhuzi.dto.jc;

import com.google.common.base.Objects;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 巨潮新闻
 *
 * @author zhuzi
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class JcEntityDTO {
    public LocalDate pubDate;
    public LocalDateTime pubDateTime;
    private String secCode;
    private String secName;
    private String annId;
    private String annTitle;
    private String adjunctUrl;
    private String adjunctType;
    private String newKeys;

    private boolean kzz;

    private LocalDateTime fetchDate;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        JcEntityDTO that = (JcEntityDTO) o;
        return Objects.equal(secCode, that.secCode) && Objects.equal(annId, that.annId);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(secCode, annId);
    }


}
